﻿<UserControl x:Class="USElections.Tiles.CalendarBackTile"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             FontFamily="{StaticResource PhoneFontFamilyNormal}"
             FontSize="{StaticResource PhoneFontSizeNormal}"
             Foreground="{StaticResource PhoneForegroundBrush}"
             d:DesignHeight="173"
             d:DesignWidth="173">
    <Grid x:Name="LayoutRoot"
          Width="173"
          Height="173"
          Background="{StaticResource PhoneAccentBrush}">

        <TextBlock Text="{Binding Next.Subject}"
                   TextWrapping="Wrap"
                   FontFamily="{StaticResource PhoneFontFamilySemiLight}"
                   FontSize="{StaticResource PhoneFontSizeSmall}"
                   Foreground="{StaticResource PhoneForegroundBrush}"
                   Margin="10,6,10,6"
                   HorizontalAlignment="Left"
                   MaxHeight="100"
                   VerticalAlignment="Top" />

        <TextBlock Text="{Binding StartDate}"
                   FontFamily="{StaticResource PhoneFontFamilySemiLight}"
                   FontSize="{StaticResource PhoneFontSizeSmall}"
                   Foreground="{StaticResource PhoneForegroundBrush}"
                   Margin="10,0,10,6"
                   HorizontalAlignment="Left"
                   VerticalAlignment="Bottom" />

        <Border Background="Black"
                HorizontalAlignment="Right"
                VerticalAlignment="Bottom"
                Margin="0, 0, 0, 36"
                Width="100"
                Visibility="{Binding IsMoreVisibile}"
                CornerRadius="8, 0, 0, 8">
            <TextBlock FontFamily="{StaticResource PhoneFontFamilySemiLight}"
                       FontSize="{StaticResource PhoneFontSizeSmall}"
                       Foreground="{StaticResource PhoneForegroundBrush}"
                       Text="{Binding Path=Count, StringFormat='{0} items...'}"
                       Margin="12, 6, 0, 6" />
        </Border>
    </Grid>
</UserControl>